<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../../lib/bootstrap-3.4.1-dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../font/iconfont.css">
    <link rel="stylesheet" href="../../css/public.css">
    <link rel="stylesheet" href="../../css/orderform/order.css">
    <link rel="stylesheet" href="../../css/orderform/dahuodan.css">
    <script src="../../lib/jquery/jquery-3.6.0.min.js"></script>
    <script src="../../lib/session.js"></script>
    <script src="../../javaScript/public.js"></script>
    <script src="../../javaScript/orderform/orderformlist.js"></script>
    <script src="../../lib/bootstrap-3.4.1-dist/js/bootstrap.min.js"></script>
    <script src="../../javaScript/orderform/data.js"></script>
</head>
<body>
    <div class="container">
        <span>发货单</span>
        <button class="mbutton-blue">
            <span></span>
            <span>打印发货单</span>
        </button>
    </div>
    <div class="container orderm">
        <span>商品信息</span>
        <table class="orderbiao">
            <thead>
                <tr>
                    <td>商品编号</td>
                    <td>商品名称</td>
                    <td>属性</td>
                    <td>单价</td>
                    <td>数量</td>
                    <td>小计</td>
                </tr>
            </thead>
            <tbody class="ordermsg">
            
            </tbody>
        </table>
        <div class="omsg">

        </div>
    </div>
</body>
<script>
    window.onload=function(){
        let item = sessionGet('msg')
        for(let i=0;i<item.商品信息.length;i++){
                $('.ordermsg').append(`
                    <tr>
                        <td>
                            ${item.订单号}
                        </td>
                        <td>
                            ${item.商品信息[i].商品名}
                        </td>
                        <td>
                            ${item.商品信息[i].商品规格} ${item.商品信息[i].颜色} ${item.商品信息[i].尺寸} ${item.商品信息[i].款式}
                        </td>
                        <td>
                            ￥${item.商品信息[i].金额}
                        </td>
                        <td>
                            ￥${item.商品信息[i].数量}
                        </td>
                        <td>
                            ￥${item.商品信息[i].金额*item.商品信息[i].数量}
                        </td>
                    </tr>
                `)
        }
        $('.omsg').append(`
                <div>
                    <span>商品总价:</span><span>￥${item.订单金额}</span>
                    <span>运费:</span><span>￥8.00</span>
                    <span>商品总价:</span><span>￥${item.订单金额}</span>
                    <span>付款方式:</span><span>${item.付款方式}</span>
                </div>
                <div class='left'>
                    <p><span>收货人:</span><span>${item.收货信息.收货人}</span></p>
                    <p><span>手机号:</span><span>${item.收货信息.手机号}</span></p>
                    <p><span>收货地址:</span><span>${item.收货信息.收货地址}</span></p>
                </div>
        `)
    }
</script>
</html>